-
Notifications
You must be signed in to change notification settings - Fork 0
docs: add WebView-based data collection docs #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace native field-by-field data collection with WebView-based approach for Information Capture (IC). The CollectDataAction model now uses a `url` field pointing to a WalletConnect-hosted form. When present, wallets display it in a WebView instead of building native forms. The WebView handles form rendering, validation, T&C acceptance, and communicates completion via JS bridge messages (IC_COMPLETE / IC_ERROR). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…refill examples - Remove PaymentResultInfo from ConfirmPaymentResponse across all docs - Add resultInfo: PaymentResultInfo? to PaymentOptionsResponse in all platform docs and AI prompts - Add pobAddress field to all prefill data examples - Document that schema's required list can be used to determine prefill fields Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ganchoradkov
reviewed
Feb 9, 2026
- Remove Sdk-Name/Sdk-Version/Sdk-Platform headers (internal SDK use only) - Remove Client-Id header (internal use only) - Add optional App-Id header to all endpoints - Add url and schema fields to CollectData schema - Add account field to PaymentOption schema - Add networkIconUrl to AmountDisplay schema - Update confirm endpoint description (commitment point) - Update API-first page with Api-Key prerequisite and Sdk-* warning Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nfirm example - Reorder API-first flow diagram: data collection now happens before option selection - Remove Sdk-* warning block from API-first page - Add tosConfirmed field to confirm payment request example Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… comments - Remove "(no collectedData when WebView is used)" from confirm payment step comments - Remove "(Optional)" from Flutter AI prompt WebView step heading - Add keyboard behavior testing to WebView best practices - Fix prefill URL construction to handle existing query parameters using platform-native URL builders (Uri.buildUpon for Kotlin, URLComponents for Swift, Uri.replace for Flutter, separator check for JS/RN) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tion Co-Authored-By: mirna@reown.com <mirna@reown.com>
chris13524
reviewed
Feb 10, 2026
chris13524
reviewed
Feb 10, 2026
Based on patterns from the WCPay SDK (Yttrium): payment link detection, action resolution, result submission, polling, retry strategy, data collection, and expiration handling. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ganchoradkov
approved these changes
Feb 10, 2026
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Co-authored-by: Chris Smith <1979423+chris13524@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
CollectDataActionmodel now usesurl(WebView URL) andschema(JSON schema) instead offieldsarrayconfirmPayment()no longer requirescollectedDataparameter when WebView is used — the WebView submits data directlyPaymentResultInfomodel added toConfirmPaymentResponsewithtxIdandoptionAmountFiles Changed
snippets/webview-data-collection-*.mdxpayments/wallets/standalone/{kotlin,swift,react-native,flutter}.mdxpayments/wallets/walletkit/{kotlin,swift,flutter,web}.mdxpayments/wallets/walletkit/ai-prompts/{kotlin,swift,flutter,react-native}.mdxpayments/wallets/{overview,api-first}.mdxWhat changed in each doc
flowchart TD A[Payment Options Response] --> B{collectDataAction.url present?} B -->|Yes| C[Display WebView] B -->|No| D[Skip to Confirm] C --> E[User fills form in WebView] E --> F{JS Bridge Message} F -->|IC_COMPLETE| G[Proceed to confirmPayment - no collectedData needed] F -->|IC_ERROR| H[Show error, allow retry] G --> I[Payment Complete]WebView, iOSWKWebView, Flutterwebview_flutter, RNreact-native-webview)CollectDataAction→{url, schema}, removedCollectDataField/CollectDataFieldTypeCollectingDatastate →WebViewDataCollection, addedonWebViewComplete()/onWebViewError()handlersPlatform-Specific Bridge Names
android.webkit.WebViewAndroidWalletWKWebViewpayDataCollectionCompletewebview_flutter(4.10+)ReactNativeWebView(via JS bridge)react-native-webview(13.16+)ReactNativeWebView(native)Updates since last revision
Added three FAQ entries to
payments/wallets/overview.mdx:collect_dataschema.Review & Testing Checklist for Human
payments/wallets/overview.mdxrender correctly (AccordionGroup items) — runmint devand check the overview pageTest Plan
mint devlocally/payments/wallets/overviewand expand each FAQ accordionNotes